/**
 * $Id$
 * Copyright 2011-2014 Oak Pacific Interactive. All rights reserved.
 */
package com.malphi.framework.flash.result;



/**
 * @author <a href="mailto:ruofei.ma@renren-inc.com">ma ruofei</a>
 * @version 1.0 2011-11-29 下午02:38:23
 * @since 1.0
 */
public abstract class ResultFactory {
    public <T> Result<T> success(T result) {
        return new ResultImpl<T>(result, Result.SUCCESS_CODE);
    }

    public Result<ErrorInfo> error(ErrorInfo error) {
        return new ResultImpl<ErrorInfo>(error, Result.ERROR_CODE);
    }
}
